
@extends('layouts.home')
@section('content')

<div class="blog-body">

    <style>
        @media (max-width: 768px) {
            .layui-hide-xs {
                display: none !important;
            }
        }
        .blog-card-ul{
            min-height: inherit;
        }
    </style>

    <div class="layui-container">
        <blockquote class="layui-elem-quote sitemap shadow">
            <i class="layui-icon">&#xe715;</i>
            <span class="layui-breadcrumb" lay-separator=">">
            <a href="/">首页</a>
                <a><cite>学海无涯</cite></a>
        </span>
        </blockquote>
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md8">
                <div class="left-box">
                    <p class="left-box-title shadow"><i class="fa fa-cog fa-spin fa-fw" aria-hidden="true"></i>全部文章</p>
                    @foreach($article_all as $item=>$value)
                        <div class="article shadow clearfix sr-listshow">
                            <div class="article-left">
                                <img src="{{$value->cover}}"
                                     alt="{{$value->title}}"/>
                            </div>
                            <div class="article-right">
                                <div class="article-title">
                                    <a href="/article/detail/{{$value->id}}">{{$value->title}}</a>
                                </div>
                                <div class="article-abstract">
                                    {{ re_substr($value->keywords,0,100)}}
                                </div>
                                <div class="article-footer">
                                    @foreach($value->tags as $item1=>$value1)
                                        @if($item1!=4 && $item1!=3)
                                        <span class="layui-hide-xs"><i class="fa fa-tag" aria-hidden="true"></i>&nbsp;<a
                                                    style="color:#009688" href="/tag/{{$value1->id}}">{{$value1->name}}</a></span>
                                        @endif
                                    @endforeach
                                    <span><i class="fa fa-clock-o" aria-hidden="true"></i>&nbsp;{{$value->created_at}}</span>
                                    <span class="article-viewinfo">{{$value->click}}阅读</span>
                                    <span class="article-viewinfo">{{$value->comments_count}}评论</span>
                                    <span class="article-viewinfo">{{$value->zans_count}}赞</span>
                                    <a class="read layui-btn layui-btn-xs layui-btn-normal layui-hide-xs"
                                       href="/article/detail/{{$value->id}}"
                                       title="阅读全文：{{$value->title}}">阅读全文</a>
                                </div>
                            </div>
                            @if($value->openness==1)
                                <div class="flag flag-left">推荐</div>
                            @endif
                        </div>
                    @endforeach
                </div>
{{--                @if($pages!=1)--}}
                <div class="blog-pagebox">
                    <div class="laypage-main">
                        @if($page==1)
                            <span class="laypage-curr">{{$page}}</span>
                            @if($page<$pages)
                            <a href="/article/all?page={{$page+1}}" class="laypage-next">下一页</a>
                            @endif
                        @elseif($page==$pages)
                            <a href="/article/all?page={{$page-1}}" class="laypage-prev">上一页</a>
{{--                            <a href="/article/all?page={{$page}}">{{$page}}</a>--}}
                            <span class="laypage-curr">{{$page}}</span>
                        @elseif($page>1 && $page<$pages)
                            <a href="/article/all?page={{$page-1}}" class="laypage-prev">上一页</a>
                            <a href="/article/all?page={{$page-1}}">{{$page-1}}</a>
                            <span class="laypage-curr">{{$page}}</span>
                            <a href="/article/all?page={{$page+1}}">{{$page+1}}</a>
                            <a href="/article/all?page={{$page+1}}" class="laypage-next">下一页</a>
                        @endif;
                    </div>
                </div>
{{--                @endif--}}
            </div>
            <div class="layui-col-md4">
                <div class="layui-row layui-col-space10">
                    <div class="layui-col-sm6 layui-col-md12 layui-hide-xs">
                        <div class="blog-search">
                            <form class="layui-form" action="">
                                <div class="layui-form-item">
                                    <div class="search-keywords  shadow">
                                        <input type="text" name="keywords" lay-verify="required" placeholder="输入关键词搜索" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="search-submit  shadow">
                                        <a class="search-btn" lay-submit="formSearch" lay-filter="formSearch"><i class="fa fa-search"></i></a>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="layui-col-sm6 layui-col-md12 padding0">
                        <div class="article-category shadow">
                            <div class="article-category-title">分类导航</div>
                            @foreach($type_all as $item1=>$value1)
                                <a href="/category/{{$value1->id}}">{{$value1->title}}</a>

                            @endforeach
                                <div class="clear"></div>
                        </div>
                    </div>
                    <div class="layui-col-sm6 layui-col-md12">
                        <div class="blog-card shadow">
                            <div class="blog-card-title">
                                <span class="icon"><i class="layui-icon" aria-hidden="true">&#xe756;</i></span>
                                <span class="text">热文排行</span>
                            </div>
                            <ul class="blog-card-ul">
                                @foreach($hot_article as $item5=>$value5)
                                    <li>
                                        <span class="layui-badge {{($item5+1)>3?"layui-bg-blue":''}}">{{$item5+1}}</span><a href="/article/detail/{{$value5->id}}"
                                                                                                                            title="{{$value5->title}}">{{$value5->title}}</a>
                                    </li>
                                @endforeach
                                {{--<li>--}}
                                {{--<span class="layui-badge ">2</span><a href="/article/detail/31"--}}
                                {{--title="&#x90AE;&#x6211;&#x7EC4;&#x4EF6; - &#x7528;&#x6237;&#x70B9;&#x51FB;&#x5373;&#x53EF;&#x53D1;&#x9001;&#x90AE;&#x4EF6;">&#x90AE;&#x6211;&#x7EC4;&#x4EF6;--}}
                                {{--- &#x7528;&#x6237;&#x70B9;&#x51FB;&#x5373;&#x53EF;&#x53D1;&#x9001;&#x90AE;&#x4EF6;</a>--}}
                                {{--</li>--}}
                                {{--<li>--}}
                                {{--<span class="layui-badge ">3</span><a href="/article/detail/34"--}}
                                {{--title="&#x7EAF;CSS&#x5B9E;&#x73B0;&#x6587;&#x7AE0;&#x5DE6;&#x4E0A;&#x89D2;Flag&#x6807;&#x7B7E;">&#x7EAF;CSS&#x5B9E;&#x73B0;&#x6587;&#x7AE0;&#x5DE6;&#x4E0A;&#x89D2;Flag&#x6807;&#x7B7E;</a>--}}
                                {{--</li>--}}
                                {{--<li>--}}
                                {{--<span class="layui-badge layui-bg-blue">4</span><a href="/article/detail/30"--}}
                                {{--title="&#x540E;&#x53F0;&#x53EF;&#x4EE5;&#x7BA1;&#x7406;&#x6587;&#x7AE0;&#x4E86;&#xFF0C;&#x63A5;&#x4E0B;&#x6765;&#x5F00;&#x59CB;&#x505A;&#x535A;&#x5BA2;&#x524D;&#x53F0;&#x3002;">&#x540E;&#x53F0;&#x53EF;&#x4EE5;&#x7BA1;&#x7406;&#x6587;&#x7AE0;&#x4E86;&#xFF0C;&#x63A5;&#x4E0B;&#x6765;&#x5F00;&#x59CB;&#x505A;&#x535A;&#x5BA2;&#x524D;&#x53F0;&#x3002;</a>--}}
                                {{--</li>--}}
                                {{--<li>--}}
                                {{--<span class="layui-badge layui-bg-blue">5</span><a href="/article/detail/5"--}}
                                {{--title="ASP.NET Core&#x4E2D;&#x95F4;&#x4EF6;">ASP.NET--}}
                                {{--Core&#x4E2D;&#x95F4;&#x4EF6;</a>--}}
                                {{--</li>--}}
                                {{--<li>--}}
                                {{--<span class="layui-badge layui-bg-blue">6</span><a href="/article/detail/33"--}}
                                {{--title="&#x65B0;&#x529F;&#x80FD;&#x4E0A;&#x7EBF; - &#x535A;&#x6587;&#x6253;&#x8D4F;&#xFF08;&#x7F51;&#x7AD9;&#x5206;&#x4EAB;&#x7EC4;&#x4EF6;&#x63A8;&#x8350;&#xFF09;">&#x65B0;&#x529F;&#x80FD;&#x4E0A;&#x7EBF;--}}
                                {{--- &#x535A;&#x6587;&#x6253;&#x8D4F;&#xFF08;&#x7F51;&#x7AD9;&#x5206;&#x4EAB;&#x7EC4;&#x4EF6;&#x63A8;&#x8350;&#xFF09;</a>--}}
                                {{--</li>--}}
                                {{--<li>--}}
                                {{--<span class="layui-badge layui-bg-blue">7</span><a href="/article/detail/32"--}}
                                {{--title="&#x65B0;&#x529F;&#x80FD;&#x4E0A;&#x7EBF; - &#x535A;&#x6587;&#x914D;&#x4E50;&#xFF08;&#x7F51;&#x9875;&#x97F3;&#x4E50;&#x64AD;&#x653E;&#x5668;&#x63A8;&#x8350;&#xFF09;">&#x65B0;&#x529F;&#x80FD;&#x4E0A;&#x7EBF;--}}
                                {{--- &#x535A;&#x6587;&#x914D;&#x4E50;&#xFF08;&#x7F51;&#x9875;&#x97F3;&#x4E50;&#x64AD;&#x653E;&#x5668;&#x63A8;&#x8350;&#xFF09;</a>--}}
                                {{--</li>--}}
                                {{--<li>--}}
                                {{--<span class="layui-badge layui-bg-blue">8</span><a href="/article/detail/36"--}}
                                {{--title="&#x5C0F;&#x7A0B;&#x5E8F;&#x9ED1;&#x79D1;&#x6280;&#x4E4B;&#x83B7;&#x53D6;&#x624B;&#x673A;&#x53F7;&#x7801;&#x3001;&#x901A;&#x8BAF;&#x5730;&#x5740;&#x3001;&#x5730;&#x7406;&#x4F4D;&#x7F6E;">&#x5C0F;&#x7A0B;&#x5E8F;&#x9ED1;&#x79D1;&#x6280;&#x4E4B;&#x83B7;&#x53D6;&#x624B;&#x673A;&#x53F7;&#x7801;&#x3001;&#x901A;&#x8BAF;&#x5730;&#x5740;&#x3001;&#x5730;&#x7406;&#x4F4D;&#x7F6E;</a>--}}
                                {{--</li>--}}
                            </ul>
                        </div>
                    </div>
                    <div class="layui-col-sm6 layui-col-md12">
                        <div class="blog-card shadow sr-rightmodule">
                            <div class="blog-card-title">
                                <span class="icon"><i class="layui-icon" aria-hidden="true">&#xe6c6;</i></span>
                                <span class="text">随便看看</span>
                            </div>
                            <ul class="blog-card-ul">
                                @foreach($author_article as $item7=>$value7)
                                    <li>
                                        <span class="layui-badge" {{($item7+1)>=3?'layui-bg-blue':''}}>{{$item7+1}}</span><a href="/article/detail/{{$value7->id}}" title="{{$value7->title}}">{{$value7->title}}</a>
                                    </li>
                                @endforeach
                            </ul>
                        </div>
                    </div>
                    {{--<div class="layui-col-sm6 layui-col-md12">--}}
                        {{--<div class="advertisement blog-card shadow sr-rightmodule">--}}
                            {{--<div class="emptybox">--}}
                                {{--<p><i style="font-size:50px;color:#5fb878" class="layui-icon">&#xe64a;</i></p>--}}
                                {{--<p>广告区域</p>--}}
                            {{--</div>--}}
                        {{--</div>--}}
                    {{--</div>--}}
                </div>
                <!--右边悬浮 平板或手机设备显示-->
                <div class="category-toggle"><i class="fa fa-chevron-left"></i></div>
            </div>
        </div>
    </div>



    <script src="/lib/layui/layui.js?v=Q4hfA5tL6flbhH6c-jlA6yVJRpZRgzEJ43xJxeRS3Ps"></script>


</div>

@endsection